The present invention relates generally to data backup methods, and more particularly, to a system for providing a point-in-time backup copy of data stored in a data storage system.
Typically, in order to provide a point-in-time copy of data stored in a data storage system, all I/O operations to the data storage volume must be stopped and data in the host cache and any other cache in the path to the device must be flushed/copied. A copy of the entire data range of interest (typically a volume or logical unit) is then made to a backup device, and I/O to the storage system is finally resumed when the backup is complete. Alternatively, if the data to be copied resides on a mirror set (such as a two-member RAID 1 set), the set is temporarily broken, I/O resumes on the remaining member and the copy is then made to the backup device. When the copy is complete, the copy member is added back to the set and made consistent with the remaining members (a complete copy is typically required). However, the first of these backup techniques requires that the application not operate for the duration of the backup and the latter technique reduces the reliability of the data while the backup copy is being made. Furthermore, breaking the mirror set while making a copy also has the drawback of requiring additional time to restore the system to an operational mirror set while the (copied) member of the mirror set is re-merged to bring it up-to-date with I/O transactions which occurred (with its partner) during the copy process.
The present invention overcomes the aforementioned problems of the prior art and achieves an advance in the field by providing a system which allows I/O operations directed to a storage system to proceed in an uninterrupted or briefly paused manner while generating a point-in-time virtual copy (a xe2x80x98snapshotxe2x80x99) of a selected subset (e.g., a selected volume or logical unit) of the storage system. The system of the present invention operates by using a bitmap in storage system controller cache memory to indicate blocks of memory in the selected volume (e.g., logical unit [LUN] X), that have been overwritten since the snapshot was initiated. When a write to LUN X is requested, the cache bitmap is checked to determine whether the original data (in the area to be overwritten) has already been copied from LUN X to a temporary volume that is the same size or larger than LUN X, hereinafter referred to as xe2x80x98LUN Yxe2x80x99. If the original data was previously copied, then the write proceeds to LUN X. If, however, the original data would be overwritten by the presently requested write operation, then an area containing the original data is first copied from LUN X to LUN Y. Reads from LUN Y check the bitmap to determine if the requested data has already been copied from LUN X (to LUN Y). If so, the data is read from LUN Y; if not already copied, the data is read from LUN X.
In contrast to the prior art, the system of the present invention provides uninterrupted or briefly interrupted access to the primary volume (LUN X), while providing a level of protection for the data stored thereon that is not reduced as a result of the copy operation. Furthermore, the present system creates the point-in-time xe2x80x98copyxe2x80x99 requiring only very small incremental amounts of time, since a copy of only a small subset of the selected volume is made in response to the first write directed to that subset. In addition, no time is required to re-merge the members of a mirror set, since the present system never xe2x80x98breaksxe2x80x99 the set to make the point-in-time copy.
It should be noted that there is no reason that the storage controller requires an interruption of access to the unit. If I/O is not interrupted a xe2x80x9ccrash consistent copyxe2x80x9d will be created; that is, when the xe2x80x98snapshotxe2x80x99 copy command is issued, I/O operations that were in progress may have some, none, or all of the data on the snapshot. The requesting application, however may require that all I/O is in a known state before initiating the snapshot, in which case the copy operation may take a couple of seconds to insure that cache is flushed at the host.